#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int n, r, c;
char str[MAXN];
int a[MAXN], b[MAXN];
set<pair<int, int>> S;
int main() {
  scanf("%d%d%d", &n, &r, &c);
  scanf("%s", str + 1);
  S.insert({a[0], b[0]});
  for (int i = 1; i <= n; ++i) {
    a[i] = a[i - 1];
    b[i] = b[i - 1];
    if (str[i] == 'N')
      --a[i];
    if (str[i] == 'S')
      ++a[i];
    if (str[i] == 'W')
      --b[i];
    if (str[i] == 'E')
      ++b[i];
    S.insert({a[i], b[i]});
    if (S.count({a[i] - r, b[i] - c})) {
      putchar('1');
    } else {
      putchar('0');
    }
  }
  return 0;
}